package com.example.controller;

import java.util.ArrayList;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.example.pojo.Country;
import com.example.service.CountryService;


@Controller
@RequestMapping("/country")
public class CountryController {
	private static final Logger logger = LoggerFactory.getLogger(CountryController.class);	
	
	@Autowired
	CountryService countryService;
	ArrayList<Country> list = null;
	
	Country country = new Country();
	
	@RequestMapping("/s")
	@ResponseBody
	public Country getTid1() {
		return countryService.select();
	}
	
	@RequestMapping("/ss")
	@ResponseBody
	public Country getTid11() {
		int id = 3;
		country =  countryService.selectById(id);
		return country;
	}
}
